home *** CD-ROM | disk | FTP | other *** search
/ Focus for Success / Focus for Success.iso / pc / game2.dxr / 00151_Field_151.txt < prev    next >
Text File  |  1995-02-28  |  1KB  |  60 lines

  1. on gamebutton
  2.   global glcount,gltime,gseconds,glsubject2,glsubject1,ganswer1
  3.   
  4.   
  5.  showglobals
  6.   setaProp (gltime, 2, the ticks)
  7.   set me = the castNum of sprite the clickOn
  8.   set X3 = the text of cast me
  9.   IF X3=ganswer1 THEN
  10.     set A = getaProp(gltime,1)
  11.     set B = getaProp(gltime,2)
  12.     PUT(B-A) INTO T1
  13.     set X = getaProp(glcount,1)
  14.     set Y = gseconds-1
  15.     IF Y-X<0 THEN
  16.       go "GAME OVER"
  17.       mathscore
  18.       EXIT 
  19.     END IF
  20.     
  21.     PUT 60*(Y-X) INTO T2
  22.     IF T1<T2 THEN
  23.       set CT = count(glsubject1)
  24.       setaProp (glcountnum, 2, (getaProp(glcountnum,2)+1))
  25.       setaProp(glsubject1,CT+1,T1)
  26.       setaProp(glcountnum,3,0)-- this should be a line two!!!!
  27.       
  28.       correcthandler
  29.     END IF
  30.     IF T1>T2 THEN
  31.       sorryhandler
  32.     END IF
  33.   END IF
  34.   
  35.   IF X3<>gAnswer1 THEN
  36.     wrongHandler
  37.     setaProp (glcountnum,5,getaProp(glcountnum,5)+1)
  38.   END IF
  39.   
  40.   put "ppp"
  41.   setaProp(glcount,1,getaProp(glcount,1)+1)
  42.   Startgame2
  43.   
  44. end gamebutton
  45.  
  46. on wronghandler
  47.   put "wrong"
  48. end wronghandler
  49.  
  50. on sorryhandler
  51.   put "sorry it took to long"
  52. end sorryhandler
  53.  
  54. on correcthandler
  55.   put "you are correct"
  56. end correcthandler
  57.  
  58. on mathscore
  59. end mathscore
  60.